﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Web;

namespace RBS.Web.API.Models
{
    public class QueryableOrderEntry<TSource, TKey>
    {
         
        public QueryableOrderEntry(Expression<Func<TSource, TKey>> expression)
        {
            this.Expression = expression;
            OrderDirection = OrderDirection.Asc;
        }

        public QueryableOrderEntry(Expression<Func<TSource, TKey>> expression,OrderDirection orderDirection){
            this.Expression = expression;
            OrderDirection = orderDirection;
        }

        public Expression<Func<TSource, TKey>> Expression{get;set;}

        public OrderDirection OrderDirection{get;set;}
         

    }

    public enum OrderDirection
    {
        Asc, 
        Desc
    }


}